package com.zhengke.controller.cwhs;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.zhengke.common.object.Result;
import com.zhengke.pojo.CashStatistics;
import com.zhengke.service.cwhs.CashStatisticsService;


@Controller
@RequestMapping("CWHS")
public class CWHSController {
	@Autowired
	CashStatisticsService service;
	
	@RequestMapping("toCWHS.do")
	public String toCWHS() {
		
		return "cwhs/cwhs";
	}
	
	@ResponseBody
	@RequestMapping("queryList.do")
	public Result query(String source, int page,int limit) {
		CashStatistics cs = new CashStatistics();
		if(source!=null&&!source.equals("")) {
			cs.setSource(source);
		}
		Result rs =service.queryList(cs, page, limit);
		return rs;
	}
}
